package com.lysj.admin.master.bussiness.company.company.domain;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.TableName;
import com.lysj.admin.master.bussiness.company.CompanyEntity;
import com.lysj.admin.master.common.enumeration.EnumInterface;
import com.lysj.admin.master.common.spring.mpbase.MyEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Index;
import javax.persistence.Table;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @author Created by drj on 2019-12-27 14:57
 * @description 费用发放
 */
@Data
@Entity
@EqualsAndHashCode(callSuper = true)
@TableName("lysj_company_commission_apply")
@Table(name = "lysj_company_commission_apply",
        indexes = {@Index(name = "idx_company_id", columnList = "companyId")})
public class CommissionApply extends CompanyEntity {

    @AllArgsConstructor
    @Getter
    public enum TargetType implements EnumInterface{
        UNKNOWN(0,"未知"),
        APPLET(1,"小程序");//目前暂时这么命名
        private Integer code;
        private String status;
    }

    @Getter
    public enum CostStatus implements EnumInterface {
        AUDITING(1, "审核中"),
        PASS(2, "审核通过"),
        REJECT(3, "驳回"),
        GRANT(4,"已发单"),
        FINISH(5,"已完成");
        private Integer code;

        private String status;

        CostStatus(Integer code, String status) {
            this.code = code;
            this.status = status;
        }
    }
    private String companyName;
    private Date completeTime;//完成时间
    private String listName;//清单文件名
    private String provideListingPath;//发放清单路径
    private String failListing;//失败清单
    @Column(columnDefinition = "decimal(10,2)")
    private BigDecimal actPayPrice;//实发金额
    private String title;//任务标题
    @Column(length = 2000)
    private String description;//任务描述
    @Column(length = 2000)
    private String standard;//任务验收标准
    private Integer costStatus;//状态
    private transient String costStatusTxt;//状态
    private String serviceProviderId;//服务商id
    private String serviceProviderName;//服务商名称
    private String excelPath;//excel模板path
    private Integer targetType;//目标类型，如小程序A，小程序B
    private String contractId;//合同Id
}
